﻿using AutoMapper;
using B.MES.SLY.Domain.Entities;
using B.MES.SLY.Service.Input.Bom;
using B.MES.SLY.Service.Input.Customer;
using B.MES.SLY.Service.Input.Material;
using B.MES.SLY.Service.Input.ProductionLine;
using B.MES.SLY.Service.Input.Record;
using B.MES.SLY.Service.Input.Supplier;
using B.MES.SLY.Service.Input.WorkShop;
using B.MES.SLY.Service.Input.WorkStation;
using B.MES.SLY.Service.OutPut;
using AddMaterialInput = B.MES.SLY.Service.Input.Material.AddMaterialInput;
using BomMaterialIdModel = B.MES.SLY.Domain.Entities.BomMaterialIdModel;
using BomModel = B.MES.SLY.Domain.Entities.BomModel;
using EditMaterialInput = B.MES.SLY.Service.Input.Material.EditMaterialInput;
using GetMaterialOutPut = B.MES.SLY.Service.OutPut.GetMaterialOutPut;
using Parent_ChildrenModel = B.MES.SLY.Domain.Entities.Parent_ChildrenModel;

namespace B.MES.SLY.API.Autpmapper
{
    public class Mappers:Profile
    {
        public Mappers()
        {
            //车间管理
            CreateMap<AddWorkshopnput, SLY_WORKSHOP_MANAGEMENTMODEL>();
            CreateMap<SLY_WORKSHOP_MANAGEMENTMODEL, GetWorkShopOutPut>();
            CreateMap<UpdateWorkShopInput, SLY_WORKSHOP_MANAGEMENTMODEL>();
            CreateMap<GetWorkShopOutPut, SLY_WORKSHOP_MANAGEMENTMODEL>();
            //产线管理
            CreateMap<AddProductionLineInput, SLY_PRODUCTIONLINE_MANAGEMENTMODEL>();
            CreateMap<SLY_PRODUCTIONLINE_MANAGEMENTMODEL, GetProductionLineOutPut>();
            CreateMap<UpdateProductionLineInput, SLY_PRODUCTIONLINE_MANAGEMENTMODEL>();
            CreateMap<GetProductionLineOutPut, SLY_PRODUCTIONLINE_MANAGEMENTMODEL>();
            //工厂管理
            CreateMap<AddWorkStationInput, SLY_WORKSTATION_MANAGEMENTMODEL>();
            CreateMap<SLY_WORKSTATION_MANAGEMENTMODEL, GetWorkStationOutPut>();
            CreateMap< UpdateWorkStationInput, SLY_WORKSTATION_MANAGEMENTMODEL>();
            CreateMap<GetWorkStationOutPut, SLY_WORKSTATION_MANAGEMENTMODEL>();
            //客户管理
            CreateMap<AddCustomerInput, SLY_CUSTOMER_MANAGEMENTMODEL>();
            CreateMap<SLY_CUSTOMER_MANAGEMENTMODEL, GetCustomerOutPut>();
            CreateMap< UpdateCustomerInput, SLY_CUSTOMER_MANAGEMENTMODEL>();
            CreateMap<GetCustomerOutPut, SLY_CUSTOMER_MANAGEMENTMODEL>();
            //供应商管理
            CreateMap<AddSupplierInput, SLY_SUPPLIER_MANAGEMENTMODEL>();
            CreateMap<SLY_SUPPLIER_MANAGEMENTMODEL, GetSupplierOutPut>();
            CreateMap< UpdateSupplierInput, SLY_SUPPLIER_MANAGEMENTMODEL>();
            CreateMap<GetSupplierOutPut, SLY_SUPPLIER_MANAGEMENTMODEL>();
            //记录
            CreateMap<SLY_INVOICE_RECORD, GetInvoiceOutPut>();
            CreateMap<SLY_COLLECTION_RECORD, GetCollectionOutPut>();
            CreateMap<SLY_SALES_RECORDMODEL, GetSalesOutPut>();
            CreateMap<SLY_RELATION_RECORDMODEL, GetRelstionOutPut>();
            CreateMap<AddRelationInput, SLY_RELATION_RECORDMODEL>();
            CreateMap<AddSalesInput, SLY_SALES_RECORDMODEL>();

            CreateMap<AddInvoice, SLY_INVOICE_RECORD>();
            CreateMap<AddCollection, SLY_COLLECTION_RECORD>();
            CreateMap<AddDelicery, SLY_DELIVERY_RECORD>();

            //物料
            CreateMap<AddMaterialInput, BomMaterialIdModel>();
            CreateMap<BomMaterialIdModel, GetMaterialOutPut>();
            CreateMap<EditMaterialInput, BomMaterialIdModel>();
            CreateMap<GetMaterialOutPut, BomMaterialIdModel>();

            CreateMap<Parent_ChildrenModel, Bom_MaterialOutPut>();   
            CreateMap<Bom_MaterialOutPut, Parent_ChildrenModel>();
            CreateMap<BomModel, GetBomOutPut>();
            CreateMap<AddBomInput, BomModel>();


        }
    }
}
